<template>
  <view class="ui-page ui-page__scroll">
    <uiForm ref="baseForm">
      <uiField label="基本方式:">
        <template v-slot:input>
          <uiUploader v-model="isChecked" :maxCount="3"></uiUploader>
        </template>
      </uiField>

      <uiField label="上传多个:">
        <template v-slot:input>
          <uiUploader v-model="isChecked" multiable :maxCount="4" uploadText="选择图片"></uiUploader>
        </template>
      </uiField>

      <uiField label="手动上传:">
        <template v-slot:input>
          <uiUploader
            v-model="isChecked"
            :upload_auto="false"
            multiable
            :maxCount="4"
            uploadText="选择图片"
          ></uiUploader>
        </template>
      </uiField>

      <uiField label="上传前校验:">
        <template v-slot:input>
          <uiUploader
            :beforeRead="onBeforeRead"
            :deletable="false"
            v-model="isChecked"
            :upload_auto="false"
            multiable
            :maxCount="4"
            uploadText="选择图片"
          ></uiUploader>
        </template>
      </uiField>
    </uiForm>
  </view>
</template>

<script>
import uiCell from "@/components/base/cell/index.vue";
import uiCellGroup from "@/components/base/cell-group/index.vue";
import uiForm from "@/components/base/form/index.vue";
import uiField from "@/components/base/field/index.vue";

import uiUploader from "components/base/uploader/index";
export default {
  name: "demoRadioComponentPage",
  components: {
    uiCellGroup,
    uiCell,
    uiForm,
    uiField,
    uiUploader
  },
  data() {
    return {
      isChecked: [
        "http://10.159.62.247:80/group1/M00/00/01/Cp8-915u0zCAMTLZAAAzDQ4sHL4054.png"
      ],
      isChecked1: true,
      checkGroup: ["b"],
      activeIcon: "https://img.yzcdn.cn/vant/user-active.png",
      inactiveIcon: "https://img.yzcdn.cn/vant/user-inactive.png"
    };
  },
  created() {},
  mounted() {},
  methods: {
    onBeforeRead(files) {

      return files
    }
  }
};
</script>

<style scoped lang="scss"></style>
